|
Eclipse Platform Pre-release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Extension interface for IFindReplaceTarget
. Extends the find replace target's
findAndSelect method to allow regular expression find/replace.
Method Summary | |
int |
findAndSelect(int offset,
String findString,
boolean searchForward,
boolean caseSensitive,
boolean wholeWord,
boolean regExSearch)
Searches for a string starting at the given offset and using the specified search directives. |
void |
replaceSelection(String text,
boolean regExReplace)
Replaces the currently selected range of characters with the given text. |
Method Detail |
public int findAndSelect(int offset, String findString, boolean searchForward, boolean caseSensitive, boolean wholeWord, boolean regExSearch)
true
the findString is
interpreted as a regular expression for searching.
offset
- the offset at which searching startsfindString
- the string which should be foundsearchForward
- true
searches forward, false
backwardscaseSensitive
- true
performes a case sensitve search, false
an insensitive searchwholeWord
- if true
only occurences are reported in which the findString stands as a word by itself.
Must not be used in combination with regExSearch
.regExSearch
- if true
findString represents a regular expression
Must not be used in combination with wholeWord
.
PatternSyntaxException
- if regExSearch is true
and findString is an invalid regular expressionpublic void replaceSelection(String text, boolean regExReplace)
true
the text is interpreted as a regular
expression for searching.
This target must be editable. Otherwise nothing happens.
text
- the substitution textregExReplace
- if true
text represents a regular expression
IllegalStateException
- if a REPLACE or REPLACE_FIND operation is not preceded by a successful FIND operation
PatternSyntaxException
- if regExReplace is true
and text is an invalid regular expression
|
Eclipse Platform Pre-release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |